package com.ruoyi.back.service.impl;

import java.util.List;

import com.ruoyi.back.domain.Mechanism;
import com.ruoyi.back.mapper.MechanismMapper;
import com.ruoyi.back.service.IMechanismService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 院校、讲师、团队、机构Service业务层处理
 * 
 * @author luguanqing
 * @date 2021-04-06
 */
@Service
public class MechanismServiceImpl implements IMechanismService
{
    @Autowired(required = false)
    private MechanismMapper mechanismMapper;

    /**
     * 查询院校、讲师、团队、机构
     * 
     * @param id 院校、讲师、团队、机构ID
     * @return 院校、讲师、团队、机构
     */
    @Override
    public Mechanism selectMechanismById(String id)
    {
        return mechanismMapper.selectMechanismById(id);
    }

    /**
     * 查询院校、讲师、团队、机构列表
     * 
     * @param mechanism 院校、讲师、团队、机构
     * @return 院校、讲师、团队、机构
     */
    @Override
    public List<Mechanism> selectMechanismList(Mechanism mechanism)
    {
        return mechanismMapper.selectMechanismList(mechanism);
    }

    /**
     *
     * @return
     */
    @Override
    public List<Mechanism> selectMechanismIndex() {
        return mechanismMapper.selectMechanismIndex();
    }

    /**
     * 新增院校、讲师、团队、机构
     * 
     * @param mechanism 院校、讲师、团队、机构
     * @return 结果
     */
    @Override
    public int insertMechanism(Mechanism mechanism)
    {
        return mechanismMapper.insertMechanism(mechanism);
    }

    /**
     * 修改院校、讲师、团队、机构
     * 
     * @param mechanism 院校、讲师、团队、机构
     * @return 结果
     */
    @Override
    public int updateMechanism(Mechanism mechanism)
    {
        return mechanismMapper.updateMechanism(mechanism);
    }

    /**
     * 批量删除院校、讲师、团队、机构
     * 
     * @param ids 需要删除的院校、讲师、团队、机构ID
     * @return 结果
     */
    @Override
    public int deleteMechanismByIds(String[] ids)
    {
        return mechanismMapper.deleteMechanismByIds(ids);
    }

    /**
     * 删除院校、讲师、团队、机构信息
     * 
     * @param id 院校、讲师、团队、机构ID
     * @return 结果
     */
    @Override
    public int deleteMechanismById(String id)
    {
        return mechanismMapper.deleteMechanismById(id);
    }
}
